#include "BaseCharacter.h"
#include "../Map/ZoneManager.h"
#include "../../Render/TextureManager.h"


BaseCharacter::BaseCharacter(void)
{
	m_Random.SeedRandom();
	m_Random.Random(INT_MIN, INT_MAX);
	m_Health = 100;
}


BaseCharacter::~BaseCharacter(void)
{
}

void BaseCharacter::Update(float deltaTime)
{

}

void BaseCharacter::Render(void)
{
	int midX = (m_ImageWidth/2);
	int midY = (m_ImageHeight/2);

	m_Camera->Draw(m_ImageID, ((int)m_BasePositionX)-midX, ((int)m_BasePositionY)-midY, 1.0f, 1.0f, NULL, (float)midX, (float)midY);
}

// Mutators:
void BaseCharacter::SetCamera(Camera2D* camera)
{
	m_Camera = camera;
}

void BaseCharacter::HealthLoss(int Damage)
{
	m_Health -= Damage;
	if(m_Health < 0)
		m_Health = 0;
}

// Accessors
int BaseCharacter::GetHealth(void)
{
	return m_Health;
}